<?php

namespace LPCISII\PHP2012Bundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
use LPCISII\PHP2012Bundle\Form\ImagesType;

class ArticlesType extends AbstractType
{
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
            ->add('reference', 'hidden')
            ->add('nom')
            ->add('descriptif')
            ->add('prix')
            ->add('delais')
            ->add('poids')
            ->add('categorie')
            ->add('images', 'collection', array('type'      => new ImagesType,
                                              'prototype' => true,
                                              'allow_add' => true,
                                              'label' => ' ',
                                              'required' => false))
        ;
    }

    public function getName()
    {
        return 'lpcisii_php2012bundle_articlestype';
    }
}
